package com.cskaoyan.day1.generic5;

/**
 * @author Common-zhou
 * @since 2023-02-27 11:20
 */
public class FatherDemo {
    public static void main(String[] args) {
        Father<Integer> father = new Father<>();

        Integer ft = father.ft;

        // 定义类的时候，没有指定Father的类型，所以为默认类型 Object
        Son1 son1 = new Son1();
        Object ft1 = son1.ft;

        Son2 son2 = new Son2();
        String ft2 = son2.ft;


        Son3<String> son3 = new Son3();
        Integer ft5 = son3.ft;

        Son4<Integer> son4 = new Son4<>();
        Integer ft3 = son4.ft;

        Son4<String> son41 = new Son4<>();
        String ft6 = son41.ft;

        Son4<Integer> son42 = new Son4<>();
        Integer ft7 = son42.ft;

        Son5<String> son5 = new Son5<>();
        String ft4 = son5.ft;


    }
}
